// FrogFavoriteDialog.h : Declaration of the CFrogFavoriteDialog

#pragma once

#pragma warning(disable:4482)

#include "resource.h"       // main symbols
#include <atlhost.h>
#include "FrogBaseDialog.h"
#include "MenuItemsHolder.h"

// CFrogFavoriteDialog
class CFrogFavoriteDialog: public CFrogBaseDialog<CFrogFavoriteDialog>
{
public:
	CFrogFavoriteDialog();	

	enum { IDD = IDD_DIALOG_FAVORITES };

	BEGIN_MSG_MAP(CFrogFavoriteDialog)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
		COMMAND_HANDLER(IDC_BUTTON_ADD, BN_CLICKED, OnClickedAdd)
		COMMAND_HANDLER(IDC_BUTTON_REMOVE, BN_CLICKED, OnClickedRemove)
		COMMAND_HANDLER(IDC_BUTTON_UP, BN_CLICKED, OnClickedUp)
		COMMAND_HANDLER(IDC_BUTTON_DOWN, BN_CLICKED, OnClickedDown)
		// FrogBaseDialog Inherited
		CHAIN_MSG_MAP(CFrogBaseDialog)
	END_MSG_MAP()

	// Handler prototypes:
	//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

	LRESULT OnClickedAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedUp(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedDown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

	static void GetFavoritesList(list<FileOps>& list);

	static void OpenManagementWindow(HWND parent = NULL)
	{
		CFrogFavoriteDialog* frogFavoriteDialog = new CFrogFavoriteDialog();
		frogFavoriteDialog->Create(parent);
	}

private:
	HIMAGELIST himl;
	MenuItemsHolder m_MenuItemsHolder;

	void SaveFavoritesData();
};


